package com.rran.study.chat.friend.service.impl;

import com.rran.study.chat.common.utils.BeanCopyUtil;
import com.rran.study.chat.friend.entity.UserInfoDO;
import com.rran.study.chat.friend.mapper.UserMapper;
import com.rran.study.chat.friend.mq.entity.SyscUserInfoMqEntity;
import com.rran.study.chat.friend.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author yy
 * @Type UserServiceImpl.java
 * @Desc
 * @date 2020/8/19
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public void syncUpdateUserInfo(SyscUserInfoMqEntity userMQEntity) {
        UserInfoDO userInfoDO = new UserInfoDO();
        BeanCopyUtil.copyFromSrcToDest(userMQEntity,userInfoDO);
        userMapper.insert(userInfoDO);
    }
}
